<?php
header("Access-Control-Allow-Origin:*");
header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE");
header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, Accept-Language, Origin, Accept-Encoding");

// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'local');

define('YII_VENDOR', '/../../vendor/');

//require(__DIR__ . '/../common/corelib/alidayu/api_sdk/vendor/autoload.php');
require(__DIR__ . YII_VENDOR . 'autoload.php');
require(__DIR__ . YII_VENDOR . 'yiisoft/yii2/Yii.php');
require(__DIR__ . '/../common/corelib/alidayu/api_sdk/vendor/autoload.php');
//require_once(__DIR__.'/classes/CFPropertyList/CFPropertyList.php');

$config = yii\helpers\ArrayHelper::merge(
    require(__DIR__ . '/../config/config.php'),
    require(__DIR__ . '/../../config/local.php')
);

require_once(__DIR__ . '/../../common/functions.php');

$application = new yii\web\Application($config);
$application->run();